//
//  URLSchemeExampleAppDelegate.m
//  URLSchemeExample
//

#import "URLSchemeExampleAppDelegate.h"
#import "URLSchemeExampleViewController.h"

@implementation URLSchemeExampleAppDelegate

@synthesize window;
@synthesize viewController;


- (void)applicationDidFinishLaunching:(UIApplication *)application {
	[window addSubview:viewController.view];
	[window makeKeyAndVisible];
}

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    // Override point for customization after application launch.
	if (launchOptions) {
		
		UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
		NSString *msg = pasteboard.string;
		
		UIAlertView *alert = [[UIAlertView alloc]
							  initWithTitle:@""
							  message:msg
							  delegate:self
							  cancelButtonTitle:@"OK"
							  otherButtonTitles:nil];
		[alert show];
		[alert release];
	}

	[self applicationDidFinishLaunching:application];
    return YES;
}

- (void)dealloc {
    [viewController release];
    [window release];
    [super dealloc];
}

@end
